<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
if (sizeof($page) > 0) {
	echo "<div class='catalog-one-brand-page'>";
		echo "<div class='image'>";
		$parent_link = "/".$url."/".$page['brand_id']."/";
			echo "<a href='".$parent_link."'>";
				if ($page['brand_image'] != "" && file_exists("./uploads/catalog_brands/".$page['brand_id']."/middle/".$page['brand_image'])) {
					$im = getimagesize("./uploads/catalog_brands/".$page['brand_id']."/middle/".$page['brand_image']);
					$margin = round((200 - $im[1]) / 2);
					echo "<img src='/uploads/catalog_brands/".$page['brand_id']."/middle/".$page['brand_image']."' alt='".$page['brand_title']."' title='".$page['brand_title']."' style='margin: ".$margin."px 0 0 0;' />";
				} else {
					echo "<img src='/data/images/x.gif' alt='".$page['brand_title']."' title='".$page['brand_title']."' />";
				}
			echo "</a>";
		echo "</div>";
		echo "<div class='desc'>";
			echo "<h1>";
			echo $page['brand_title'];
			echo "</h1>";
			echo $page['brand_text'];
		echo "</div>";
	echo "</div>";
	echo "<br class='cc' />";
	if(sizeof($items) > 0){
		echo "<ul>";
		foreach($items as $item){
			echo $item."<br />";
		}
		echo "</ul>";
	}
}
